//
//  CardViewController.h
//  ICard
//
//  Created by fanshao on 11-2-27.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyCard.h"
#import "constant.h"



@interface CardViewController : UIViewController
<UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, 
UIImagePickerControllerDelegate, UINavigationControllerDelegate> {
	UIButton *imageButton;
	UITextField *userNameTextField;
	UITextField *phoneNumberTextField;
	UIButton *saveButton;
	UIButton *headSelButton;
	UITableView *contactTableView;
	
	MyCard *mycard;
	UIAlertView *myAlertView ;
	NSMutableArray *contactDataArray;
	EContactType curType; 
	
	NSMutableData *receivedData;
}

@property(nonatomic, retain) IBOutlet UIButton *imageButton;
@property(nonatomic, retain) IBOutlet UITextField *userNameTextField;
@property(nonatomic, retain) IBOutlet UITextField *phoneNumberTextField;
@property(nonatomic, retain) IBOutlet UIButton *saveButton;
@property(nonatomic, retain) IBOutlet UIButton *headSelButton;
@property(nonatomic, retain) IBOutlet UITableView *contactTableView;

@property(nonatomic, retain) NSMutableArray *contactDataArray;
@property (nonatomic, retain) NSMutableData *receivedData;

- (IBAction)getImage:(id)sender;
- (IBAction)saveInfo:(id)sender;
- (IBAction)headSelect:(id)sender;

- (IBAction)selectContactType:(id)sender;
- (IBAction)addContactInfo:(id)sender;


- (void)deleteCell:(id)sender;
//!TextField Delegate Event
- (void)textFieldDidEndEditing:(UITextField *)textField;
- (BOOL)textFieldShouldReturn:(UITextField *)textField;
@end
